]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
magnifier: Remove call to dropped Clutter::get_default_frame_rate()
authorSebastian Keller <skeller@gnome.org>
Mon, 8 Nov 2021 04:00:47 +0000 (05:00 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 16 Nov 2021 23:34:38 +0000 (23:34 +0000)
Clutter::get_default_frame_rate() has been removed in mutter!2002, but
it is still being used here. Given that this was basically hardcoded to
60 in mutter with the only way of changing this being an obscure
environment variable, just use that value here directly. This avoids a
crash when starting gnome-shell with the magnifier enabled.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4761
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2025>

js/ui/magnifier.js

index 2443248d34df0a4c72730d931c65dcad74e7667e..e68dc84f0e6f924e9a697d7a5a3b169ed672f769 100644 (file)
@@ -200,7 +200,7 @@ var Magnifier = class Magnifier {
      */
     startTrackingMouse() {
         if (!this._pointerWatch) {
-            let interval = 1000 / Clutter.get_default_frame_rate();
+            let interval = 1000 / 60;
             this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(interval, this.scrollToMousePos.bind(this));
         }
     }